<div ng-controller="OrderNotPickedController as vm">
  <h1 class="page-title">待接运单<a class="btn pull-right" ng-href="/api/order/published/export">导出Excel</a></h1>

  <div class="well table-well">
    <div class="table-responsive">
      <table class="table table-striped table-bordered">
        <thead>
          <tr>
            <th>单号</th>
            <th>发布企业</th>
            <th>货物名称</th>
            <th>货物数量</th>
            <th>始发城市</th>
            <th>到达城市</th>
            <th>发布日期</th>
            <th >
             意向人数
            </th>
            <th>#</th>
            
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="order in vm.orders">
            <td><a ng-click="vm.viewDetail(order.id)" >{{order.orderId}}</a></td>
            <td>{{order.shipper.enterpriseName}}</td>
            <td>{{order.cargoName}}</td>
            <td>{{order.cargoCount}}</td>
            <td>{{order.fromCity}}</td>
            <td>{{order.toCity}}</td>
            <td>{{order.createTime| date:"yyyy-MM-dd"}}</td>
            <td >{{order.intentionCount}}
          </td>
          <td><a class="btn btn-primary btn-mini" ng-click="vm.viewDetail(order.id)">查看</a>
          <a class="btn btn-mini" ng-show="(vm.userRole!='shipper' || (vm.userRole == 'shipper' && vm.shipperType == 1 && order.shipper.id==vm.userId)) && vm.userRole!='revenuer'" ng-click="vm.sendIntention(order.id)">发起意向</a></td>
        </tr>
        
        
      </tbody>
    </table>
  </div>
  <p ng-show="vm.noRecord">没有找到符合条件的数据！</p>
</div>
<div class="pagination pagination-centered" ng-show="!vm.noRecord">
        <ul>
         <li ng-class="vm.firstPage? 'disabled':''" ng-switch="vm.firstPage">
         <a ng-switch-when="false" ng-click="vm.loadPage(vm.currentPage-1)" >&laquo;</a>
         <a ng-switch-when="true" >&laquo;</a>
         </li>
          <li ng-repeat="me in vm.pages" ng-class="me==vm.currentPage? 'active':''" ng-switch="me==vm.currentPage">
            <a ng-switch-when="false" ng-click="vm.loadPage(me)" >{{me}}</a>
            <a ng-switch-when="true" >{{me}}</a>
            </li>
          <li ng-class="vm.lastPage? 'disabled':''" ng-switch on="vm.lastPage">
          <a ng-switch-when="false" ng-click="vm.loadPage(vm.currentPage+1)">&raquo;</a>
          <a ng-switch-when="true" >&raquo;</a>
          </li>
        </ul>
      </div>
</div>